function(add_google_test)
    if("^${CMAKE_SOURCE_DIR}" STREQUAL "^${PROJECT_SOURCE_DIR}")
        set(prefix ARG)
        set(noValues)
        set(singleValues TARGET)
        set(multiValues SOURCE DEPENDENT)
        cmake_parse_arguments(${prefix} "${noValues}" "${singleValues}" "${multiValues}" ${ARGN})
        message(STATUS "You are testing ${${prefix}_TARGET}")
        add_executable(${${prefix}_TARGET} ${${prefix}_SOURCE})
        target_link_libraries(${${prefix}_TARGET} PRIVATE ${${prefix}_DEPENDENT} GtestConfig)
        set_target_properties(${${prefix}_TARGET} PROPERTIES
            CXX_STANDARD 11
            CXX_STANDARD_REQUIRED On
            CXX_EXTENSIONS OFF)
    endif()
endfunction()